<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father{
            width: 300px;
            height: 200px;
            background-color: #fff;
            border: 1px solid #000;
            margin: 200px auto;
        }
        .son{
            width: 100px;
            height: 100px;
            background-color: pink;
            transition: all 1s;
        }
        /* 鼠标移入到父级盒子，改变子级位置 */
        .father:hover .son{
            transform: translate(100px ,50px);
            /* 百分比。按照盒子自身尺寸计算结果 */
            transform: translate(50%,75%);
            
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son"></div>
    </div>
</body>
</html>